package com.comum.javahomework420242025.repository;

import com.comum.javahomework420242025.pojo.Input;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface InputRepository extends JpaRepository<Input,Long> {

    @Query("select i from input i where " +
            "cast(i.contractid as string) like %:str% or i.contract.name like %:str% or " +
            "cast(i.inputprice as string) like %:str% or i.paytime like %:str% or " +
            "i.user.name like %:str%")
    Page<Input> getPayPhases(String str, Pageable pageable);
}
